home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / PROGMISC / FPCHELP.LZH / KERNEL2.HLP < prev    next >
Text File  |  1988-07-27  |  14KB  |  455 lines

  1. \ KERNEL2.HLP   Help file for the KERNEL2.SEQ file
  2.  
  3. TOS             ( --- a1 )
  4.         Top OF Stack, Saved during Task switching.
  5.  
  6. ENTRY           ( --- a1 )
  7.         Jumped to during multitasking.
  8.  
  9. LINK            ( --- a1 )
  10.         Points to next task in the circular queue
  11.  
  12. ES0             ( --- a1 )
  13.         ES register initial segment.
  14.  
  15. SP0             ( --- a1 )
  16.         Empty parameter stack for this task.
  17.  
  18. RP0             ( --- a1 )
  19.         Empty return stack for this task.
  20.  
  21. DP              ( --- a1 )
  22.         Size of dictionary.  Next available location.
  23.  
  24. OFFSET          ( --- a1 )
  25.         Added to all block references.
  26.  
  27. BASE            ( --- a1 )
  28.         The current numeric base for number input output.
  29.  
  30. HLD             ( --- a1 )
  31.         Points to a converted character during numeric output.
  32.  
  33. PRINTING        ( --- a1 )
  34.         A variable which holds a flag that Indicates whether printing is
  35.         enabled.
  36.  
  37. EMIT            ( c1 -- )
  38.         A defered word which sends a character to the output device.
  39.  
  40. KEY?            ( --- f1 )
  41.         A defered word that returns a true flag if a key waiting.
  42.  
  43. KEY             ( --- c1 )
  44.         A defered word to get a key from user.
  45.  
  46. TYPE            ( a1 n1 --- )
  47.         A defered word used to Print a string to the current output device
  48.         from the segment specified in the variable TYPESEG.
  49.  
  50. EXTYPE          ( seg a1 n1 --- )
  51.         A defered word used to print a string to the current output device
  52.         from external memory specified in segment SEG.
  53.  
  54. YDP             ( --- a1 )
  55.         A variable that holds the address in HEAD space of the next
  56.         available byte.
  57.  
  58. PRIOR           ( --- a1 )
  59.         Points to the last vocabulary that was searched.
  60.  
  61. DPL             ( --- a1 )
  62.         The decimal point location for number input.
  63.  
  64. WARNING         ( --- a1 )
  65.         Checked by WARN for duplicate warnings.
  66.  
  67. R#              ( --- a1 )
  68.         The cursor position during editing.
  69.  
  70. HLD             ( --- a1 )
  71.         Points to a converted character during numeric output.
  72.  
  73. LAST            ( --- a1 )
  74.         Points to the name of the most recently CREATEd word.
  75.  
  76. CSP             ( --- a1 )
  77.         Used for compile time error checking.
  78.  
  79. CURRENT         ( --- a1 )
  80.         New words are added to the CURRENT vocabulary.
  81.  
  82. #VOCS           ( --- a1 )
  83.         The number of elements in the search order array.
  84.  
  85. CONTEXT         ( --- a1 )
  86.         The array specifying the search order.
  87.  
  88. 'TIB            ( --- a1 )
  89.         Points to characters entered by user.
  90.  
  91. WIDTH           ( --- a1 )
  92.         Number of characters to keep in name field.
  93.  
  94. VOC-LINK         ( --- a1 )
  95.          Points to the most recently defined vocabulary.
  96.  
  97. BLK             ( --- a1 )
  98.         If non-zero, the block number we are interpreting.
  99.  
  100. >IN             ( --- a1 )
  101.         Number of characters interpreted so far.
  102.  
  103. SPAN            ( --- a1 )
  104.         Number of characters input by EXPECT.
  105.  
  106. #TIB            ( --- a1 )
  107.         Used by WORD, when interpreting from the terminal.
  108.  
  109. END?            ( --- a1 )
  110.         True if input stream exhausted, else false.
  111.  
  112. #OUT            ( --- a1 )
  113.         A variable that holds the column number of the most recent type or
  114.         emit to the display.
  115.  
  116. #LINE           ( --- a1 )
  117.         A variable that holds the line number of the current line on which
  118.         text is being typed.
  119.  
  120. BL              ( --- c1 )
  121.         Return hex 20, decimal 32 the value of an Ascii space.
  122.  
  123. BS              ( --- c1 )
  124.         Return the value 8, an Ascii Back Space.
  125.  
  126. BELL            ( --- c1 )
  127.         Return the value 7, an Ascii BELL char.
  128.  
  129. CAPS            ( --- a1 )
  130.         If true, then convert names to upper case
  131.  
  132. FILL            ( a1 n1 c1 --- )
  133.         FILL the string starting at a1 for count n1 bytes
  134.         with the character c1. Both BLANK and ERASE are
  135.         special cases of FILL.
  136.  
  137. ERASE           ( a1 n1 --- )
  138.         Fill the string with zeros
  139.  
  140. BLANK           ( a1 n1 --- )
  141.         Fill the string with blanks
  142.  
  143. COUNT           ( a1 --- a2 n1 )
  144.         Given the address on the stack, returns the address
  145.         plus one and the byte at that address.  Useful for strings.
  146.  
  147. LENGTH          ( a1 --- a2 n1 )
  148.         Given the address on the stack, returns the address
  149.         plus two and the two byte contents of the address.
  150.  
  151. MOVE            ( a1 a2 n1 --- )
  152.         Move the specified bytes n1 from address a1 ro address a2. No
  153.         overlapping of data will occur.
  154.  
  155. >UPPER
  156.         subroutine which converts character in AX to upper case.
  157. UPC
  158.         Convert a Char to upper Case
  159. UPPER
  160.         Take the string at the specified address and convert it to
  161.         upper case.  It converts the string in place, so be sure to
  162.         make a copy of the original if you need to use it later.
  163.  
  164. HERE            ( --- a1 )
  165.         Return the address of the top of the dictionary
  166.  
  167. PAD             ( --- a1 )
  168.         Floating Temporary Storage area.
  169.  
  170. -TRAILING       ( a1 n1 --- a2 n2 )
  171.         Return the address and length of the given string ignoring
  172.         trailing blanks.
  173.  
  174. COMP            ( a1 a2 n1 --- f1 )
  175.         This performs a string compare.  If the two strings are
  176.         equal, then COMPARE returns 0.  If the two strings differ,
  177.         then COMPARE returns -1 or +1.  -1 is returned if string 1
  178.         is less than string 2.  +1 is returned if string 1 is
  179.         greater than string 2.  All comparisons are relative to
  180.         ASCII order.
  181.  
  182. CAPS-COMP       ( a1 a2 n1 --- f1 )
  183.         The code on this screen handles the case where case is not
  184.         significant.  Each character is converted to upper case
  185.         before the comparison is made.  Thus, lower case a and upper
  186.         case A are considered identical.
  187.  
  188. COMPARE         ( a1 a2 n1 --- f1 )
  189.         Performs a string compare. If CAPS is true, characters from
  190.         both strings are converted to upper case before comparing.
  191.  
  192. OSF             ( --- a1 )
  193.         Operating Sys call in progress flag.
  194.  
  195. FCDOS
  196.        called by other assembler code to do INT 21 (DOS call). BP
  197.        and SI are the critical FORTH registers.  Create is used here
  198.        to force lable into target dictionary. OSF is set during the
  199.        DOS call, can be tested by interrupt routines which call
  200.        non-reentrant DOS functions.
  201.  
  202. XFDOS
  203.         call INT 21 with most any reg combination used.
  204.  
  205. ?CS:            ( --- seg )
  206.         leave FORTH CS on stack
  207.  
  208. @L              ( seg adr - n )
  209.         load word long from seg and adr.
  210.  
  211. C@L             ( seg adr - byt)
  212.         char load long from seg and adr.
  213.  
  214. C!L             ( byt seg adr -)
  215.         char store long in seg and adr.
  216.  
  217. !L              ( n seg adr -- )
  218.         word store long
  219.  
  220. BDOS            ( n1 func# --- al )
  221.         Load up the registers and do a DOS system call. return the
  222.         result placed in the A register on the stack.
  223.  
  224. (KEY?)          ( --- f1 )
  225.         Returns true if the user pressed a key, otherwise false.
  226.  
  227. (KEY)           ( --- c1 )
  228.         Pauses until a key is ready, and returns it on the stack.
  229.  
  230. (EMIT)          ( c1 --- )
  231.         sends a character to both the console and the printer.
  232.  
  233. CMOVEL          ( sseg sptr dseg dptr cnt -- )
  234.         move char block long from source seg sseg and sptr, to
  235.         destination seg dseg and dptr for length cnt.
  236.  
  237.  
  238. YSTART          ( --- a1 )
  239.         if non-zero, ptr to start of headers after dictionary.
  240.         Used to set DP in this case.
  241.  
  242. YSEG            ( --- a1 )
  243.         SEG for header segment
  244.  
  245. MEMCHK          ( f1 --- )
  246.         abort with memory error message if true
  247.  
  248. DOSVER          ( --- n1 )
  249.         get DOS version number
  250.  
  251. SETYSEG         ( --- )
  252.         Set the segment variables as needed.
  253.  
  254. CR              ( --- )
  255.         Typically set to CRLF, above. PR-STAT Return printer status,
  256.         if implemented, else TRUE (PRINT) The value of the DEFERRED
  257.         word EMIT when you want to send a character to the printer.
  258.  
  259. CRLF            ( --- )
  260.         Sends a carriage return line feed sequence.
  261.  
  262.  
  263. TYPE            ( a1 n1 --- )
  264.         Display the given string on the terminal.
  265.  
  266. SPACE           ( --- )
  267.         Send a space to the terminal
  268.  
  269. SPACES          ( n1 --- )
  270.         Send a set of spaces to the terminal
  271.  
  272. BACKSPACES      ( n1 --- )
  273.         Send a set of Backspaces to the terminal.
  274.  
  275. BEEP            ( --- )
  276.         Ring the bell on the terminal
  277.  
  278. BS-IN
  279.         If at beginning of line, beep, otherwise back up 1.
  280.  
  281. (DEL-IN)
  282.         If at beginning of line, beep, otherwise back up and erase 1.
  283.  
  284. BACK-UP
  285.         Wipe out the current line by overwriting it with spaces.
  286.  
  287. RES-IN
  288.         Reset the system to a relatively clean state.
  289.  
  290. P-IN
  291.         Toggle the printer on or off
  292.  
  293. CR-IN
  294.         Finish input and remember the number of chars in SPAN
  295.  
  296. (CHAR)
  297.         Process an ordinary character by appending it to the buffer.
  298.  
  299. CHAR
  300.         is usually (CHAR). Executed for most characters.
  301.         DEL-IN is usually (DEL-IN). Executed for delete characters.
  302.  
  303. EXPECT          ( a1 n1 --- )
  304.         Get a string from the terminal and place it in the buffer
  305.         provided.  Performs a certain amount of line editing.
  306.         Saves the number of characters input in the Variable SPAN.
  307.         Processes control characters per the array pointed to by CC.
  308.  
  309. TIB             ( --- a1 )
  310.         Leaves address of text input buffer.
  311.  
  312. QUERY           ( --- )
  313.         Get more input from the user and place it at TIB.
  314.  
  315. VIEW#           ( --- a1 )
  316.         returns address of the view# field for this file.
  317.  
  318.  
  319. DEFAULT
  320.         Opens the default file per the execute line.
  321.         This does nothing if no file was given.
  322.  
  323. DIGIT
  324.        Returns a flag indicating whether or not the character is a
  325.        valid digit in the given base.  If so, returns converted
  326.        value and true,  otherwise returns char and false.
  327.  
  328. DOUBLE?
  329.         Returns non-zero if period was encountered.
  330.  
  331. CONVERT
  332.         Starting with the unsigned double number ud1 and the string
  333.         at adr1, convert the string to a number in the current base.
  334.         Leave result and address of unconvertable digit on stack.
  335.  
  336. (NUMBER?)
  337.         Given a string containing at least one digit, convert it
  338.         to a number.
  339.  
  340. NUMBER?
  341.         Convert the count delimited string at addr to a double
  342.         number.  NUMBER? takes into account a leading minus sign,
  343.         and stores a pointer to the last delimiter in DPL.
  344.         The string must end with a blank.
  345.         Leaves a true flag if successful.
  346.  
  347. (NUMBER)
  348.         Convert the count delimited string at addr to a double
  349.         number.  (NUMBER) takes into account a leading minus sign,
  350.         and stores a pointer to the last period in DPL.  Note the
  351.         string must end with a blank or an error message is issued.
  352.  
  353. NUMBER
  354.         Convert a string to a number.  Normally (NUMBER)
  355.  
  356. HOLD
  357.         Save the char for numeric output later.
  358.  
  359. <#
  360.         Start numeric conversion.
  361.  
  362. #>
  363.         Terminate numeric conversion.
  364.  
  365. SIGN
  366.         If n1 is negative insert a minus sign into the string.
  367.  
  368. #
  369.         Convert a single digit in the current base.
  370.  
  371. #S
  372.         Convert a number until it is finished.
  373.  
  374. HEX             ( --- )
  375.         All subsequent numeric IO will be in Hexadecimal.
  376.  
  377. DECIMAL         ( --- )
  378.         All subsequent numeric IO will be in Decimal.
  379.  
  380. OCTAL           ( --- )
  381.         All subsequent numeric IO will be in Octal.
  382.  
  383. (U.)            ( n1 --- a1 n2 )
  384.         Convert an unsigned 16 bit number to a string.
  385.  
  386. U.              ( n1 --- )
  387.         Output as an unsigned single number with trailing space.
  388.  
  389. U.R             ( n1 n2 --- )
  390.         Output as an unsigned single number right justified.
  391.  
  392. (.)             ( n1 --- a1 n2 )
  393.         Convert a signed 16 bit number to a string.
  394.  
  395. .               ( n1 --- )
  396.         Output as a signed single number with a trailing space.
  397.  
  398. .R              ( n1 n2 --- )
  399.         Output as a signed single number right justified.
  400.  
  401. (UD.)           ( d1 --- a1 n1 )
  402.         Convert an unsigned double number to a string.
  403.  
  404. UD.             ( d1 --- )
  405.         Output as an unsigned double number with a trailing space
  406.  
  407. UD.R            ( d1 n1 --- )
  408.         Output as an unsigned double number right justified.
  409.  
  410. (D.)            ( d1 --- a1 n1 )
  411.         Convert a signed double number to a string.
  412.  
  413. D.              ( d1 --- )
  414.         Output as a signed double number with a trailing space.
  415.  
  416. D.R             ( d1 n1 --- )
  417.         Output as a signed double number right justified.
  418.  
  419. SKIP            ( a1 n1 c1 --- )
  420.         Given the address and length of a string, and a character to
  421.         look for, run through the string while we continue to find
  422.         the character.  Leave the address of the mismatch and the
  423.         length of the remaining string.
  424.  
  425. SCAN            ( a1 n1 c1 --- )
  426.         Given the address and length of a string, and a character to
  427.         look for, run through the string until we find
  428.         the character.  Leave the address of the match and the
  429.         length of the remaining string.
  430.  
  431. /STRING
  432.         Index into the string by n.  Returns addr+n and len-n.
  433.  
  434. SOURCE          ( --- a1 n1 )
  435.         Return a string from the current input stream.
  436.  
  437. SOURCE-PARSE-WRD        ( C1 --- A1 N1 )
  438.         Scan the input stream until char is encountered.  Skip over
  439.         leading chars.  Update >IN pointer. Leaves the address and
  440.         length of the enclosed string.
  441.  
  442. PARSE           ( a1 --- a2 n1 )
  443.         Scan the input stream until char is encountered. Update >IN
  444.         pointer. Leaves the address and length of the enclosed
  445.         string.
  446.  
  447. 'WORD           ( --- A1 )
  448.         Leaves the same address as WORD. In this system, 'WORD is
  449.         the same as HERE.
  450.  
  451. WORD            ( C1 --- A1 )
  452.         Parse the input stream for char and return a count delimited
  453.         string at here.  Note there is always a blank following it.
  454.  
  455.